New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Fix code-blocks in spaced-comment docs #7524
Conversation
LGTM |
@mgol, thanks for your PR! By analyzing the history of the files in this pull request, we identified @pedrottimark, @scriptdaemon and @gyandeeps to be potential reviewers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking a look at the preview of the commit on your branch, it looks like one of the bullet points also gets caught up in code markup. Can you please investigate?
I see why the code blocks were indented then. :) The problem is such a code
block finishes the list so the indentation of the bullet point makes the
Markdown parser to think it's another code block. If I de-indent it, it
will look like a bullet on the main level instead of the second one.
I don't know how to resolve this problem while keeping the JSON language
specified. Maybe we should remove the language part (which will remove
syntax highlighting for those 2 blocks) and keep the indentation?
BTW, GitHub handles the current code as it is on master perfectly fine, it
must be the Markdown to HTML converter the ESLint site uses that has a bug.
|
Also, my PR makes the code blocks look de-indented which may not be a huge
annoyance but it does get look a little out of the flow.
|
I think we can just move the code blocks inline with the bullet that appears ahead of them. |
@nzakas That will work, although it's not possible to specify the language that way. Do you want me to do that anyway? |
@mgol I think the language can be reasonably inferred in this case :) |
@mgol could you try removing the language specification to check if it can be inferred? If that's the case, then I think we would be good to go here! |
@vitorbal I meant the user can infer the language, not the template. :) |
@nzakas ah, right! Sorry, I misunderstood you then.
…On Fri, Nov 25, 2016 at 7:17 PM Nicholas C. Zakas ***@***.***> wrote:
@vitorbal <https://github.com/vitorbal> I meant the user can infer the
language, not the template. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7524 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAmNdt9EdNrTFOysAGoUZh2Iqi89XKYRks5rByZOgaJpZM4KnRzX>
.
|
@mgol Would love to land this - looks like one more small change is needed. Thanks! |
The space-comment docs page had indented code blocks with the JSON type. Because of that they weren't converted to HTML correctly, leaving `json` in plain text on the page.
LGTM |
@kaicataldo PR updated; sorry for the delay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for contributing!
What is the purpose of this pull request? (put an "X" next to item)
[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
I removed the indentation of the JSON code blocks.
Is there anything you'd like reviewers to focus on?
Double-check if this really fixes the issue. I don't know how to test it locally, I tried
npm run gensite
but it was running for ages.Commit message:
The space-comment docs page had indented code blocks with the JSON type. Because
of that they weren't converted to HTML correctly, leaving
json
in plain texton the page.